﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Entity;
using FreshCms.BackEnd.ControlsCommon;

namespace FreshCms.BackEnd.Controls
{
    public partial class Dashboard : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // only check login, not Permission
            if (System.Web.HttpContext.Current.Session["User"] == null)
                Response.Redirect("/BackEnd/xlogin.aspx");

            // assign Psm auto = 1 
            var chkPms = new InPms{PmsView = 1, PmsUpdate = 1, PmsDelete = 1};
            // show Pms in Top Bar
            var ucTopBar = Page.Master.FindControl("TopBarPms") as TopBarPms;
            ucTopBar.BindData(chkPms);
        }
    }
}